1 DIM P(15):ON ERROR GOTO 950:OPEN "I",#1,"RDLX.DFT":FOR P=0 TO 15:INPUT #1,P(P):NEXT:CLOSE:ON ERROR GOTO 900
2 DATA BACKGROUND,GREEN,RED,D ORANGE,BROWN,L GREEN,ORANGE,YELLOW
3 DATA BLUE,CYAN,D MAGENTA,GREY,L BLUE,L CYAN,MAGENTA,WHITE
5 CLEAR ,24900,500,32768!:SCREEN 2:SCREEN 5:DIM P(15):DIM A(8000):DIM B(2800):DIM C(400):DIM BAR(390):LD=1:BAR=1:GET(0,0)-(319,199),A:SP=2:DEF SEG=&HB800:PC=16
6 ON ERROR GOTO 950:CLOSE:RESET:OPEN "I",#1,"RDLX.DFT":FOR Z=0 TO 15:INPUT #1,P(Z):NEXT:CLOSE:ON ERROR GOTO 900:VIEW PRINT 1 TO 25
15 CLS:REM *RUFUS DRAW*(C)1990 BROOKS DEFOREST
16 OX=0:OY=30:NX=0:NY=30
20 FOR P=0 TO 15:PALETTE P,P:NEXT
21 LINE(0,0)-(18,17),12,BF:GET(0,0)-(18,17),C:CLS
25 LINE(0,0)-(319,23),7,B:LINE(1,1)-(318,22),15,B
30 COLOR 11:LOCATE 2,12:PRINT "RUFUS DRAW DELUXE"
31 C=-1:FOR A=30 TO 150 STEP 16:C=C+1:LINE(10,A)-(40,A+10),P(C),BF:C=C+1:LINE(160,A)-(190,A+10),P(C),BF:NEXT:LINE(10,30)-(40,40),15,B:LINE(11,31)-(39,39),7,B:LINE(12,32)-(38,38),8,B
32 COLOR 7:RESTORE 2:FOR A=5 TO 20 STEP 2:READ T$:LOCATE A,7:PRINT T$
33 NEXT
34 FOR A=5 TO 20 STEP 2:READ T$:LOCATE A,26:PRINT T$:NEXT
35 LINE(0,170)-(319,199),7,B:LINE(1,171)-(318,198),15,B
40 FOR A=20 TO 290 STEP 48:LINE(A,175)-(A+20,194),11,B:LINE(A+1,176)-(A+19,193),3,B:NEXT
45 LINE(25,190)-(30,180),10:LINE(30,180)-(35,190),10
46 LINE(73,180)-(78,190),10:LINE(78,190)-(83,180),10
47 LINE(121,185)-(131,180),10:LINE(121,185)-(131,190),10
48 LINE(169,180)-(179,185),10:LINE(179,185)-(169,190),10
49 LINE(217,185)-(227,185),10:CIRCLE(222,185),3,10
50 LINE(265,180)-(275,180),10:LINE(265,185)-(275,185),10:LINE(265,190)-(275,190),10
51 COLOR 14:LOCATE 24,7:PRINT "1":LOCATE 24,13:PRINT "2":LOCATE 24,19:PRINT "9":LOCATE 24,25:PRINT "0":LOCATE 24,31:PRINT "5":LOCATE 24,37:PRINT "6"
53 LINE(OX,OY+1)-(OX+6,OY+5),0:LINE(OX+6,OY+5)-(OX,OY+9),0:LINE(NX,NY+1)-(NX+6,NY+5),15:LINE(NX+6,NY+5)-(NX,NY+9),15:OX=NX:OY=NY
55 A$=INKEY$:IF A$="" THEN 55
56 SX=0:IF A$="1" THEN SX=21 ELSE IF A$="2" THEN SX=69 ELSE IF A$="9" THEN SX=117 ELSE IF A$="0" THEN SX=165 ELSE IF A$="5" THEN SX=213 ELSE IF A$="6" THEN SX=261
57 IF SX<>0 THEN PUT(SX,176),C:FOR A=1 TO 10:NOISE 5,15,.1:NEXT:PUT(SX,176),C
60 IF A$=CHR$(27) THEN LD=0:CLS:GOTO 6
61 IF A$="R" THEN P=15:FOR Z=1 TO 15:P(Z)=P:P=P-1:NEXT:GOTO 20
62 IF A$="T" THEN FOR Z=1 TO 15:P(Z)=Z:NEXT:GOTO 20
63 IF A$="C" THEN FOR Z=1 TO 15 STEP 3:P(Z)=3:P(Z+1)=5:P(Z+2)=7:NEXT:GOTO 20
64 IF A$="M" THEN P(1)=8:P(2)=7:P(3)=7:P(4)=15:P(5)=15:P(6)=15:P(7)=7:P(8)=8:P(9)=8:P(10)=7:P(11)=7:P(12)=15:P(13)=15:P(14)=7:P(15)=15:GOTO 20
65 IF A$="1" AND NY<>30 THEN NY=NY-16:GOTO 53 ELSE IF A$="2" AND NY<>142 THEN NY=NY+16:GOTO 53 ELSE IF A$="2" AND NX=0 THEN NX=150:NY=30:GOTO 53 ELSE IF A$="2" AND NX=150 THEN NX=0:NY=30:GOTO 53
66 IF A$="1" AND NX=0 THEN NX=150:NY=142:GOTO 53 ELSE IF A$="1" AND NX=150 THEN NX=0:NY=142:GOTO 53
67 C=((NY-30)/16)*2:IF NX=150 THEN C=C+1
68 IF A$="9" AND P(C)>0 THEN P(C)=P(C)-1:GOTO 96 ELSE IF A$="9" THEN P(C)=15:GOTO 96
69 IF A$="0" AND P(C)<15 THEN P(C)=P(C)+1:GOTO 96 ELSE IF A$="0" THEN P(C)=0:GOTO 96
70 IF A$="5" THEN LINE(2,172)-(317,197),0,BF:COLOR 7:LOCATE 23,10:PRINT "UPDATING DEFAULT FILE":LINE(20,175)-(25,188),4,BF:LINE(20,192)-(25,195),12,BF:LINE(295,175)-(300,188),4,BF:LINE(295,192)-(300,195),12,BF:LINE(72,183)-(240,183),4:GOTO 98
75 IF A$="6" THEN 100
95 GOTO 55
96 IF C=0 THEN 97 ELSE LINE(NX+10,NY)-(NX+40,NY+10),P(C),BF:GOTO 55
97 LINE(13,33)-(37,37),P(C),BF:GOTO 55
98 OPEN "O",#1,"RDLX.DFT":FOR P=0 TO 15:WRITE #1,P(P):NEXT:CLOSE:LINE(2,172)-(317,197),0,BF:GOTO 40
100 IF F$="" THEN FF$="UNTITLED" ELSE FF$=F$
101 X=160:Y=100:CLS:FOR P=0 TO 15:PALETTE P,P(P):NEXT:PUT(0,0),A,PSET:PP=POINT(X,Y):GET(0,0)-(319,8),BAR:GET(X-2,Y-2)-(X+2,Y+2),C:IF BAR=0 THEN YT=0:GOTO 120 ELSE YT=10
105 COLOR 7:LOCATE 1,1:PRINT FF$:COLOR 15:FOR C=1 TO 15:LOCATE 1,10+C:COLOR C:PRINT CHR$(219):NEXT:COLOR 15:LOCATE 1,10:PRINT CHR$(177):LINE(0,8)-(319,8),3
106 LINE(302,0)-(303,7),0,BF
109 IF PC=0 THEN LOCATE 1,39:COLOR 15:PRINT CHR$(177) ELSE IF PC=16 THEN COLOR 15:LOCATE 1,39:PRINT "?" ELSE COLOR PC:LOCATE 1,39:PRINT CHR$(178)
110 IF BAR=1 THEN LINE(311,0)-(311,7),0:IF CC=0 THEN LOCATE 1,40:COLOR 15:PRINT CHR$(177) ELSE IF BAR=1 THEN COLOR CC:LOCATE 1,40:PRINT CHR$(219)
115 IF BAR=1 THEN COLOR 15:LOCATE 1,26:PRINT X" ":LOCATE 1,31:PRINT ","Y" "
120 REM
125 DX=0:DY=0:IF STICK(0)<30 AND X>0 THEN DX=-1 ELSE IF STICK(0)>90 AND X<319 THEN DX=1
126 A$=INKEY$:IF A$<>"" THEN 155
130 IF STICK(1)<30 AND Y>YT THEN DY=-1 ELSE IF STICK(1)>90 AND Y<199 THEN DY=1
131 PSET(X,Y),PP:X=X+DX*SP:Y=Y+DY*SP
134 IF X<0 THEN X=0 ELSE IF X>319 THEN X=319
135 IF Y<YT+SZ THEN Y=YT+SZ ELSE IF Y>199 THEN Y=199
137 IF Y1<0 THEN Y1=0 ELSE IF Y2>199 THEN Y2=199
138 IF SZ>0 THEN LINE(X-SZ,Y-SZ)-(X+SZ,Y+SZ),CC,BF:PP=POINT(X,Y) ELSE PP=POINT(X,Y):IF PP<9 THEN PSET(X,Y),15 ELSE PSET(X,Y),1
139 IF STRIG(1)=-1 AND PC=16 THEN PSET(X,Y),CC:PP=CC ELSE IF STRIG(1)=-1 AND PP=PC THEN PSET(X,Y),CC:PP=CC
150 IF BAR=1 AND CORD=1 THEN 115 ELSE 125
155 IF A$=CHR$(13) THEN CC=CC+1:IF CC=16 THEN CC=0
156 IF A$=CHR$(13) THEN 110
157 IF A$="8" AND Y>YT THEN DY=-1:GOTO 131 ELSE IF A$="2" AND Y<199 THEN DY=1:GOTO 131 ELSE IF A$="4" AND X>0 THEN DX=-1:GOTO 131 ELSE IF A$="6" AND X<319 THEN DX=1:GOTO 131
158 IF A$=" " AND PC=16 THEN PSET(X,Y),CC:PP=CC:GOTO 135 ELSE IF A$=" " AND PP<>PC THEN PSET(X,Y),CC:PP=CC:GOTO 135
159 IF A$="P" THEN PSET(X,Y),PP:PUT(0,0),BAR,PSET:GET(0,0)-(319,199),A:GOTO 15 ELSE PSET(X,Y),PP
160 IF A$="F" THEN 200
161 IF A$="L" THEN 205
162 IF A$="R" THEN 220
163 IF A$="B" AND BAR=1 THEN PUT(0,0),BAR,PSET:YT=0:BAR=0:GOTO 115
164 IF A$="B" THEN BAR=1:YT=10:PSET(X,Y),PP:GET(0,0)-(319,8),BAR:IF Y<YT THEN Y=YT:PP=POINT(X,Y):GOTO 105 ELSE IF A$="B" THEN 105
165 IF A$="C" THEN 230
166 IF A$="E" THEN EL=1:GOTO 230 ELSE IF A$="W" THEN EL=2:GOTO 230
167 IF A$="I" THEN 250
168 IF A$="O" THEN 270
169 IF A$="S" THEN 280
170 IF A$="[" AND SZ<4 THEN SZ=SZ+1 ELSE IF A$="]" AND SZ>0 THEN SZ=SZ-1 ELSE IF A$="'" THEN SZ=0
171 IF A$="D" THEN PSET(X,Y),PP:PUT(0,0),BAR,PSET:GET(0,0)-(319,199),A:GOTO 600
172 IF A$="," THEN 700
173 IF A$="." THEN 715
174 IF A$="/" THEN PC=PC+1:IF PC<17 AND BAR=1 THEN 109 ELSE IF PC>16 THEN PC=0:IF BAR=1 THEN 109
175 IF A$="-" THEN 750 ELSE IF A$="=" THEN 755
176 IF A$="G" THEN 760 ELSE IF A$="T" THEN 765
177 IF A$=";" THEN PC=16:IF BAR=1 THEN 109
178 IF A$=CHR$(8) THEN CC=CC-1:IF CC=-1 THEN CC=15
179 IF A$=CHR$(8) THEN 110
195 IF A$="V" THEN 330
197 IF A$="Z" AND CORD=0 THEN CORD=1 ELSE IF A$="Z" THEN CORD=0
198 IF A$="!" AND SP=1 THEN SP=2 ELSE IF A$="!" AND SP=2 THEN SP=1
199 GOTO 115
200 REM *FILL*
201 IF BAR=1 THEN PUT(0,0),BAR,PSET
202 PSET(X,Y),PP:PAINT(X,Y),CC:GET(0,0)-(319,8),BAR:PP=POINT(X,Y):IF BAR=1 THEN 105 ELSE 115
205 REM *LINE*
206 ST=0
207 XX=X:YY=Y:GET(XX,YY)-(X,Y),A:X3=XX:Y3=YY
208 GOSUB 500:PUT(X3,Y3),A,PSET
209 IF X>XX THEN X4=X:X3=XX ELSE X4=XX:X3=X
210 IF Y>YY THEN Y4=Y:Y3=YY ELSE Y4=YY:Y3=Y
211 GET(X3,Y3)-(X4,Y4),A:IF ST=0 THEN LINE(X,Y)-(XX,YY),CC ELSE LINE(X,Y)-(XX,YY),CC,,RND*19999
212 IF A$=CHR$(13) OR STRIG(1)=-1 THEN PP=POINT(X,Y):GOTO 115
213 IF A$=CHR$(27) THEN PUT(X3,Y3),A,PSET:X=XX:Y=YY:GOTO 115
214 IF A$="Z" THEN X=0 ELSE IF A$="X" THEN X=319 ELSE IF A$="M" THEN XX=X:YY=Y:GOSUB 500:GOTO 209 ELSE IF A$="S" AND ST=0 THEN ST=1 ELSE IF A$="S" THEN ST=0
215 GOTO 208
220 REM *RECTANGLE*
221 XX=X:YY=Y:GET(XX,YY)-(X,Y),A:X3=XX:Y3=YY
222 GOSUB 500:PUT(X3,Y3),A,PSET
223 IF X>XX THEN X4=X:X3=XX ELSE X4=XX:X3=X
224 IF Y>YY THEN Y4=Y:Y3=YY ELSE Y4=YY:Y3=Y
225 GET(X3,Y3)-(X4,Y4),A:IF ST=0 THEN LINE(X,Y)-(XX,YY),CC,B ELSE LINE(X,Y)-(XX,YY),CC,B,RND*19999
226 IF A$=CHR$(13) OR STRIG(1)=-1 THEN PP=POINT(X,Y):GOTO 115
227 IF A$=CHR$(27) THEN PUT(X3,Y3),A,PSET:X=XX:Y=YY:GOTO 115
228 IF A$="Z" THEN X=0 ELSE IF A$="X" THEN X=319 ELSE IF A$="F" THEN LINE(X,Y)-(XX,YY),CC,BF:PP=POINT(X,Y):GOTO 115 ELSE IF A$="S" AND ST=0 THEN ST=1 ELSE IF A$="S" THEN ST=0
229 GOTO 222
230 XX=X:YY=Y:IF BAR=1 THEN PUT(0,0),BAR,PSET
231 X1=XX-CS:X2=XX+CS:Y1=YY-CS:Y2=YY+CS
232 IF X1<0 THEN X1=0
233 IF X2>319 THEN X2=319
234 IF Y1<0 THEN Y1=0
235 IF Y2>199 THEN Y2=199
236 GET(X1,Y1)-(X2,Y2),A:IF EL=0 THEN CIRCLE(XX,YY),CS,CC ELSE IF EL=1 THEN CIRCLE(XX,YY),CS,CC,,,AS ELSE CIRCLE(XX,YY),CS,CC,,,1+AS
237 A$=INKEY$:IF A$="!" AND SP=1 THEN SP=2 ELSE IF A$="!" THEN SP=1
238 IF A$="8" THEN CS=CS+1 ELSE IF A$="2" AND CS>1 THEN CS=CS-1
239 IF STICK(0)<10 THEN CS=CS+SP ELSE IF STICK(0)>109 AND CS>1 THEN CS=CS-SP
240 IF A$=CHR$(13) OR STRIG(1)=-1 THEN 245
241 IF EL>0 AND A$="4" THEN AS=AS+(SP/90) ELSE IF EL>0 AND A$="6" AND AS>.01 THEN AS=AS-(SP/90)
243 PUT(X1,Y1),A,PSET:IF A$=CHR$(27) THEN 245
244 GOTO 231
245 EL=0:IF BAR=1 THEN GET(0,0)-(319,8),BAR:GOTO 105 ELSE 115
250 PSET(X,Y),PP
251 XX=X:YY=Y:GET(X,Y)-(X,Y),A:X3=X:Y3=Y
252 GOSUB 500:PUT(X3,Y3),A,PSET:IF A$=CHR$(27) THEN X=XX:Y=YY:GOTO 115
253 IF X<XX THEN X3=X:X4=XX ELSE X3=XX:X4=X
254 IF Y<YY THEN Y3=Y:Y4=YY ELSE Y3=YY:Y4=Y
255 GET(X3,Y3)-(X4,Y4),A:LINE(X3,Y3)-(X4,Y4),7,B,RND*9999
260 IF A$=CHR$(13) OR STRIG(1)=-1 THEN PUT(X3,Y3),A,PSET:GET(X3,Y3)-(X4,Y4),B:SPR=1:PSET(XX,YY),PP:PP=POINT(X,Y):SX=X4-X3:SY=Y4-Y3:GOTO 115
269 GOTO 252
270 IF X+SX>319 OR Y+SY>199 THEN 115
271 BRS=0:PSET(X,Y),PP:XX=X:YY=Y:PUT(X,Y),B
272 PUT(X,Y),B:OX=X:OY=Y:GOSUB 500:IF X+SX>319 THEN X=OX
273 IF Y+SY>199 THEN Y=OY
274 PUT(X,Y),B:IF A$=CHR$(27) THEN PUT(X,Y),B:X=XX:Y=YY:GOTO 115
275 IF A$=CHR$(13) OR STRIG(1)=-1 THEN PUT(X,Y),B,PSET:PP=POINT(X,Y):GOTO 115
276 IF A$="T" THEN PP=POINT(X,Y):GOTO 115
277 IF A$="M" THEN PUT(X,Y),B
278 IF A$="B" AND BRS=0 THEN BRS=1 ELSE IF A$="B" THEN BRS=0
279 IF BRS=1 THEN PUT(X,Y),B:GOTO 272 ELSE 272
280 PSET(X,Y),PP:IF BAR=1 THEN PUT(0,0),BAR,PSET
281 XX=X:YY=Y:GET(X,Y)-(X,Y),A:X3=X:Y3=Y
282 GOSUB 500:PUT(X3,Y3),A,PSET:IF A$=CHR$(27) THEN X=XX:Y=YY:GOSUB 805:GOTO 800
283 IF X<XX THEN X3=X:X4=XX ELSE X3=XX:X4=X
284 IF Y<YY THEN Y3=Y:Y4=YY ELSE Y3=YY:Y4=Y
285 GET(X3,Y3)-(X4,Y4),A:LINE(X3,Y3)-(X4,Y4),RND*14,B,RND*9999:IF A$="Z" THEN X=0 ELSE IF A$="X" THEN X=319
286 IF A$="U" OR A$="D" THEN 296
287 IF A$="L" OR A$="R" THEN 297
288 IF A$="W" THEN PUT(X3,Y3),A,PSET:GOTO 770
289 IF A$="G" THEN 780
295 GOTO 282
296 PUT(X3,Y3),A,PSET:DF=Y4-Y3:C=-1:FOR A=Y3 TO Y3+(DF/2):C=C+1:D=Y4-C:GET(X3,A)-(X4,A),A:GET(X3,D)-(X4,D),C:PUT(X3,D),A,PSET:PUT(X3,A),C,PSET:NEXT:PP=POINT(X,Y):GOTO 800
297 PUT(X3,Y3),A,PSET:DF=X4-X3:C=-1:FOR A=X3 TO X3+(DF/2):C=C+1:D=X4-C:GET(A,Y3)-(A,Y4),A:GET(D,Y3)-(D,Y4),C:PUT(A,Y3),C,PSET:PUT(D,Y3),A,PSET:NEXT:PP=POINT(X,Y):GOTO 800
330 IF BAR=1 THEN PUT(0,0),BAR,PSET
331 GET(0,0)-(319,8),BAR:COLOR 15:LOCATE 1,1:PRINT "SELECT VERIATION (0-9)"
332 A$=INKEY$:IF A$="" THEN 332
334 IF VAL(A$)>9 OR VAL(A$)<0 THEN 332
335 RD=VAL(A$):PUT(0,0),BAR,PSET
336 IF BAR=1 THEN 105 ELSE 120
500 DX=0:DY=0:IF STICK(0)<10 AND X>0 THEN DX=-1 ELSE IF STICK(0)>109 AND X<319 THEN DX=1
501 A$=INKEY$:IF A$="!" AND SP=1 THEN SP=2 ELSE IF A$="!" AND SP=2 THEN SP=1 ELSE IF A$<>"" THEN 535
505 IF STICK(1)<10 AND Y>YT THEN DY=-1 ELSE IF STICK(1)>109 AND Y<199 THEN DY=1
510 X=X+DX*SP:Y=Y+DY*SP
511 IF Y<0 THEN Y=0 ELSE IF Y>199 THEN Y=199
512 IF X<0 THEN X=0 ELSE IF X>319 THEN X=319
515 X1=X-2:X2=X+2:Y1=Y-2:Y2=Y+2:IF X1<0 THEN X1=0 ELSE IF X2>319 THEN X2=319
520 IF Y1<0 THEN Y1=0 ELSE IF Y2>199 THEN Y2=199
530 RETURN
535 IF A$="4" AND X>0 THEN DX=-1 ELSE IF A$="6" AND X<319 THEN DX=1 ELSE IF A$="8" AND Y>YT THEN DY=-1 ELSE IF A$="2" AND Y<199 THEN DY=1
540 GOTO 505
600 CLS:COLOR 11:LOCATE 2,9:PRINT "RUFUS DRAW DELUXE ";:COLOR 3:PRINT "FILES":FOR P=0 TO 15:PALETTE P,P:NEXT
601 IF F$="" THEN FF$="UNTITLED"
605 LINE(0,0)-(319,23),7,B:LINE(1,1)-(318,22),15,B
606 COLOR 13:LOCATE 6,2:PRINT "[Z] QUIT PROGRAM"
610 COLOR 12:LOCATE 8,2:PRINT "[1] CATERLOG OF FILES
611 LOCATE 10,2:PRINT "[2] LOAD FRAME":IF F$="" THEN COLOR 4 ELSE COLOR 12
612 LOCATE 12,2:PRINT "[3] MEMORY SAVE":COLOR 12
613 LOCATE 14,2:PRINT "[4] SAVE AS..
614 LOCATE 16,2:PRINT "[0] CLEAR FRAME STORE"
615 LOCATE 18,2:PRINT "[5] RETURN
616 LINE(210,24)-(210,155),2:LINE(0,155)-(319,155),2
617 COLOR 15:LOCATE 22,12:PRINT "(C)1990 RUFUS PRO":COLOR 7
618 LOCATE 24,8:PRINT "PROGRAMMED BY BROOKS DEFOREST"
619 COLOR 10:LOCATE 6,30:PRINT "FILE MEM"
620 COLOR 9:LOCATE 8,30:PRINT FF$
625 ON ERROR GOTO 680
630 A$=INKEY$:IF A$="" THEN 630
631 IF A$="4" THEN 675
632 IF A$="3" AND F$<>"" THEN B$=F$:GOTO 676
633 IF A$="Z" THEN SCREEN 2:SCREEN 0:TYY=1:CHDIR "..":RUN "menu"
635 IF A$="5" THEN ON ERROR GOTO 900:CLS:FOR P=0 TO 15:PALETTE P,P(P):NEXT:GOTO 100
636 IF A$="1" THEN LINE(0,24)-(319,199),0,BF:COLOR 13:LOCATE 6,1:PRINT "FILES ON DISC:":PRINT "--------------":COLOR 14:GOSUB 650:COLOR 5:PRINT "(PRESS SPACE)":WHILE INKEY$<>" ":WEND:GOTO 600
637 IF A$="2" THEN 660
638 IF A$="0" THEN CLS:GET(0,0)-(319,199),A:F$="":PLAY "A40C40A40":GOTO 600
649 GOTO 630
650 ON ERROR GOTO 655
651 FILES "*.XRD":ON ERROR GOTO 900:RETURN
655 RESUME 656
656 ON ERROR GOTO 900:RETURN
660 B$="":LINE(0,156)-(319,199),0,BF:COLOR 7:LOCATE 22,5:PRINT "F/LOAD:":GOTO 670
661 A$=INKEY$:IF A$="" THEN 661
662 IF ASC(A$)>31 THEN 666
663 IF A$=CHR$(27) THEN RETURN 600
664 IF A$=CHR$(8) AND LEN(B$)>0 THEN B$=LEFT$(B$,LEN(B$)-1):LOCATE 22,12:PRINT B$" ":GOTO 661
665 IF A$=CHR$(13) AND LEN(B$)>0 THEN RETURN ELSE 661
666 IF A$="." OR A$="!" OR A$="*" OR A$="?" OR A$="/" THEN NOISE 0,15,.5:GOTO 661
667 IF LEN(B$)<8 THEN B$=B$+A$:LOCATE 22,12:PRINT B$" ":GOTO 661
670 COLOR 15:GOSUB 661:F$=B$
671 CLS:BLOAD F$+".XRD":GET(0,0)-(319,199),A:F$=B$:PLAY "A40C40A40":GOTO 600
675 B$="":LINE(0,156)-(319,199),0,BF:COLOR 7:LOCATE 22,5:PRINT "F/SAVE:":COLOR 15:GOSUB 661:CLS:PUT(0,0),A,PSET:BSAVE B$+".XRD",0,&H8000:F$=B$:PLAY "A40C40A40":GOTO 600
676 CLS:PUT(0,0),A,PSET:BSAVE F$+".XRD",0,&H8000:F$=B$:PLAY "A40C40A40":GOTO 600
680 IF TYY=1 THEN RESUME 9999
681 CLS:COLOR 4:PRINT "DISC ERROR :: PRESS SPACE":WHILE INKEY$<>" ":WEND:SCREEN 5:RESUME 600
700 IF BAR=1 THEN PUT(0,0),BAR,PSET
705 PSET(X,Y),PP
710 FOR A=0 TO 159:GET(A,0)-(A,199),A:GET(319-A,0)-(319-A,199),C:PUT(A,0),C,PSET:PUT(319-A,0),A,PSET:NEXT
713 GET(0,0)-(319,8),BAR
714 PP=POINT(X,Y):IF BAR=1 THEN 105 ELSE 125
715 IF BAR=1 THEN PUT(0,0),BAR,PSET
720 PSET(X,Y),PP
725 FOR A=0 TO 99:GET(0,A)-(319,A),A:GET(0,199-A)-(319,199-A),C:PUT(0,A),C,PSET:PUT(0,199-A),A,PSET:NEXT
726 GET(0,0)-(319,8),BAR
727 PP=POINT(X,Y):IF BAR=1 THEN 105 ELSE 125
750 IF BAR=1 THEN PUT(0,0),BAR,PSET
751 PSET(X,Y),PP
752 GET(8,0)-(319,199),A:GET(0,0)-(7,199),C:PUT(0,0),A,PSET:PUT(312,0),C,PSET
753 GET(0,0)-(319,8),BAR:PP=POINT(X,Y):IF BAR=1 THEN 105 ELSE 125
755 IF BAR=1 THEN PUT(0,0),BAR,PSET
756 PSET(X,Y),PP
757 GET(0,0)-(311,199),A:GET(312,0)-(319,199),C:PUT(8,0),A,PSET:PUT(0,0),C,PSET
758 GET(0,0)-(319,8),BAR:PP=POINT(X,Y):IF BAR=1 THEN 105 ELSE 125
760 IF BAR=1 THEN PUT(0,0),BAR,PSET
761 PSET(X,Y),PP
762 GET(0,0)-(319,191),A:GET(0,192)-(319,199),B:PUT(0,0),B,PSET:PUT(0,8),A,PSET
763 GOTO 758
765 IF BAR=1 THEN PUT(0,0),BAR,PSET
766 PSET(X,Y),PP
767 GET(0,8)-(319,199),A:GET(0,0)-(319,7),B:PUT(0,0),A,PSET:PUT(0,192),B,PSET
768 GOTO 758
770 FOR A=Y3 TO Y4:FOR B=X3 TO X4:C=RND*(RD*2):IF C<1 AND POINT(B,A)=PC THEN PSET(B,A),CC ELSE IF C<1 AND PC=16 THEN PSET(B,A),CC
771 NEXT:NEXT:PP=POINT(X,Y):GOTO 800
780 PUT(X3,Y3),A,PSET:LOCATE 1,1:COLOR 15:PRINT "GRADUATE:";:COLOR 7:PRINT "SELECT LIGHT DIRECTION":X1=X3:X2=X4:Y1=Y3:Y2=Y4:GOTO 9000
781 A$=INKEY$:IF A$="" THEN 781
782 IF A$=CHR$(27) THEN PUT(0,0),BAR,PSET:IF BAR=1 THEN 105 ELSE IF A$=CHR$(27) THEN 115
783 IF A$="2" THEN GOSUB 805:GOSUB 9015:GOTO 800
784 IF A$="8" THEN GOSUB 805:GOSUB 9020:GOTO 800
785 IF A$="6" THEN GOSUB 805:GOSUB 9005:GOTO 800
786 IF A$="4" THEN GOSUB 805:GOSUB 9010:GOTO 800
787 IF A$="9" THEN GOSUB 805:GOSUB 9005:GOSUB 9020:GOTO 800
788 IF A$="3" THEN GOSUB 805:GOSUB 9005:GOSUB 9015:GOTO 800
789 IF A$="1" THEN GOSUB 805:GOSUB 9010:GOSUB 9015:GOTO 800
790 IF A$="7" THEN GOSUB 805:GOSUB 9010:GOSUB 9020:GOTO 800
795 GOTO 781
800 GET(0,0)-(319,8),BAR:PP=POINT(X,Y):IF BAR=1 THEN 105 ELSE 115
805 PUT(0,0),BAR,PSET:RETURN
900 REM *ERROR ROUTIEN*
905 SCREEN 2:PALETTE 0,0:PALETTE 1,4:PRINT "OUT OF MEMORY:PRESS ESC TO QUIT                       PRESS SPACE TO RE-START"
910 A$=INKEY$:IF A$="" THEN 910
911 IF A$=CHR$(27) THEN SCREEN 0:PRINT "TANDY DOS V 2.2":PRINT "(C)INTERTAN USA LTD.":END
912 IF A$=CHR$(32) THEN RUN
913 GOTO 910
950 RESET:CLOSE
951 RESUME 952
952 FOR P=0 TO 15:P(C)=P:NEXT:ON ERROR GOTO 900:GOTO 5
9000 DX=X2-X1:DY=Y2-Y1:DA=(DY/DX)*(RD/2):GOTO 781
9005 D=.5:FOR A=X1 TO X2:D=D+DA:FOR Z=1 TO D:IF PC=16 THEN PSET(A,Y1+RND*DY),CC ELSE NX=Y1+RND*DY:IF POINT(A,NX)=PC THEN PSET(A,NX),CC
9006 NEXT:NEXT:RETURN
9010 D=.5:FOR A=X2 TO X1 STEP -1:D=D+DA:FOR Z=1 TO D:IF PC=16 THEN PSET(A,Y1+RND*DY),CC ELSE NX=Y1+RND*DX:IF POINT(A,NX)=PC THEN PSET(A,NX),CC
9011 NEXT:NEXT:RETURN
9015 D=.5:FOR A=Y1 TO Y2:D=D+DA:FOR Z=1 TO D:IF PC=16 THEN PSET(X1+RND*DX,A),CC ELSE NX=X1+RND*DX:IF POINT(NX,A)=PC THEN PSET(NX,A),CC
9016 NEXT:NEXT:RETURN
9020 D=.5:FOR A=Y2 TO Y1 STEP -1:D=D+DA:FOR Z=1 TO D:IF PC=16 THEN PSET(X1+RND*DX,A),CC ELSE NX=X1+RND*DX:IF POINT(NX,A)=PC THEN PSET(NX,A),CC
9021 NEXT:NEXT:RETURN
9999 BEEP:SCREEN 2:SCREEN 0:PRINT "Insert SYSTEM disc into driver - Press space":WHILE INKEY$<>" ":WEND:CLS:RUN "menu"
